<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m180320_024934_ADD_FIELD_B
 */
class m180320_024934_ADD_FIELD_B extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->alterColumn('{{room_use}}', 'download', Schema::TYPE_INTEGER. "(1) DEFAULT  '0' COMMENT '是否下载 0 未下载  1 已修改  2 已下载' ");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m180320_024934_ADD_FIELD_B cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180320_024934_ADD_FIELD_B cannot be reverted.\n";

        return false;
    }
    */
}
